﻿@if (ViewBag.Pager != null && ViewBag.Pager.PageCount > 1)
{
    <div class="pagination pagination-centered">
        <ul>
            @for (var i = 1; i <= ViewBag.Pager.PageCount; i++)
            {
                var c = ViewBag.Pager.Current.Equals(i) ? "class=active" : String.Empty;
                <li @c><a href="@Url.Action(@ViewBag.Pager.Action, @ViewBag.Pager.Controller, new { @count = ViewBag.Pager.Count, @page = i })">@i</a>
                </li>
            }
        </ul>
    </div>
}